<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/27
 * Time: 10:15
 */

namespace App\Transformers;

use App\Models\Log\PlayerBetFlow;
use League\Fractal\TransformerAbstract;

class PlayerBetFlowTransformer extends TransformerAbstract
{
    public function transform(PlayerBetFlow $betFlow)
    {
        return [
            'id' => $betFlow->id,
            'username' => $betFlow->username,
            'site_username' => $betFlow->site_username,
            'game_code' => $betFlow->game_code,
            'main_game_plat_code' => $betFlow->main_game_plat_code,
            'game_flow_code' => $betFlow->game_flow_code,
            'bet_amount' => $betFlow->bet_amount,
            'available_bet_amount' => $betFlow->available_bet_amount,
            'company_payout_amount' => $betFlow->company_payout_amount,
            'company_win_amount' => $betFlow->company_win_amount,
            'plat_type' => $betFlow->plat_type,
            'bet_flow_available' => $betFlow->bet_flow_available,
            'status' => $betFlow->status,
            'bet_time' => $betFlow->bet_time,
            'created_at' => $betFlow->created_at->toDateTimeString(),

        ];
    }


}